﻿/********************
 * 
 * Kaixin001 Parking Entities, which can directly JSON Deserialized from web page.
 * Parsed by marstone
 * 
 * ******************/


using System;
using System.Collections.Generic;
using System.Text;
using Studio.Network.Utilities;
using System.Drawing;
using System.Resources;
using System.Reflection;
using System.IO;

namespace Studio.Network.Kaixin001.Entities
{
    public class Card : ICloneable
    {
        int id;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        bool purchase_once;

        public bool PurchaseOnce
        {
            get { return purchase_once; }
            set { purchase_once = value; }
        }

        int price;

        public int Price
        {
            get { return price; }
            set { price = value; }
        }

        int amount = 1;

        public int Amount
        {
            get { return amount; }
            set { amount = value; }
        }

        public Card(int cardid, string cardname, int price, bool purchase_once)
        {
            this.id = cardid;
            this.name = cardname;
            this.price = price;
            this.purchase_once = purchase_once;
        }

        public object Clone()
        {
            Card card = new Card(this.id, this.name, this.price, this.purchase_once);
            card.Amount = this.amount;
            return card;
        }
    }
}
